package com.alennus.blog.rabbitMq.spring_rabbit.product_object_customer;

import com.alennus.blog.rabbitMq.spring_rabbit.config.RabbitConfig;
import com.alennus.blog.rabbitMq.spring_rabbit.domain.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by pactera on 2018/9/25.
 */
@Component
public class ProductObjectReceive {

    @RabbitListener(queues= RabbitConfig.QUEUE_SIMPLE_USER_NAME)
    public void process(User user){
        System.out.println("Receiver2 User  : " + user);
    }

}
